#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include<QEvent>
#include<QPropertyAnimation>
namespace Ui {
class BtForm;
}

class BtForm : public QWidget
{
    Q_OBJECT

public:
    explicit BtForm(QWidget *parent = nullptr);
    ~BtForm();
    void setIcon(QString icon,QString text,int index);
    int getIndex();
    void cleanBtForm();
    void getPropertyAnimation();

private:
       void Init();
protected:
       void mousePressEvent(QMouseEvent *event);

signals:
       void btCliced(int index);//自定义信号，只需要声明，不需要定义；
private:
    Ui::BtForm *ui;
    int index;
    //增加动画指针；
    QPropertyAnimation*line1animation;
    QPropertyAnimation*line2animation;
    QPropertyAnimation*line3animation;
    QPropertyAnimation*line4animation;
};

#endif // BTFORM_H
